package de.zinulla.moviethek.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;

public class MovieSqlHelper extends SQLiteOpenHelper {



	private static final String DATABASE_NAME = "mymovies.db";
	private static final int DATABASE_VERSION = 8;


	public MovieSqlHelper(Context context) {
		super(context, DATABASE_NAME, null, DATABASE_VERSION);
	}

	@Override
	public void onCreate(SQLiteDatabase database) {
		MoviesTable.onCreate(database);
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		Log.w(MovieSqlHelper.class.getName(), "Upgrading database from version " + oldVersion + " to " + newVersion
				+ ", which will destroy all old data");
		MoviesTable.onUpgrade(db, oldVersion, newVersion);
	}

}
